/**
 * 简易版模板引擎
 * @param {模板ID} temp 
 * @param {数据源} data 
 * @returns Htmlstr
 */
function template(temp, data){
  var HtmlStr = document.getElementById(temp).innerHTML,
      Regular = /{{\s*([a-zA-Z]+)\s*}}/,
      isReg = null;
  while(isReg = Regular.exec(HtmlStr)){
    HtmlStr = HtmlStr.replace(isReg[0], data[isReg[1]]);
  }
  // console.log(isReg);
  return HtmlStr;
}